/**
 * 
 */
package com.snda.relation.service.privilege.biz.blacklist;

import com.snda.relation.service.exception.ServiceInvocationException;
import com.snda.relation.service.opensocial.GetResponse;
import com.snda.relation.service.opensocial.UpdateResponse;
import com.snda.commons.servicegate.annotations.Endpoint;
import com.snda.commons.servicegate.annotations.Param;
import com.snda.commons.servicegate.annotations.Service;

/**
 * @author yangjiandong
 * 
 */
@Service("BlacklistService")
public interface BlacklistService {

	/**
	 * to find out who is in my blacklist
	 * 
	 * @param sdid
	 * @return list of long indicate the sdids of the people
	 */
	@Endpoint(alias="getMyBlacklist")
	public GetResponse<Long> listMyBlacklist(@Param("sdid") Long sdid)
			throws ServiceInvocationException;

	/**
	 * to find in whose blacklist I am
	 * 
	 * @param sdid
	 * @return list of long indicate the people who put me in the blacklist
	 */
	@Endpoint(alias="getWhoShieldMe")
	public GetResponse<Long> listWhoShieldMe(@Param("sdid") Long sdid)
			throws ServiceInvocationException;

	/**
	 * put someone in my blacklist, the person can have nothing to do with me
	 * 
	 * @param sdid
	 * @param ssdid
	 * @return to indicate whether insert a new record
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias="addPersonToBlacklist")
	public UpdateResponse addPersonToBlacklist(@Param("sdid") Long sdid,
			@Param("ssdid") Long ssdid) throws ServiceInvocationException;

	/**
	 * remove the person out my blacklist
	 * 
	 * @param sdid
	 * @param ssdid
	 * @return to indicate whether delete a record
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias="deletePersonOutBlacklist")
	public UpdateResponse removePersonOutBlacklist(@Param("sdid") Long sdid,
			@Param("ssdid") Long ssdid) throws ServiceInvocationException;

	/**
	 * remove whole blacklist of sdid
	 * 
	 * @param sdid
	 * @param ssdid
	 * @return to indicate whether delete a blacklist
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias="deleteAll")
	public UpdateResponse removeAll(@Param("sdid") Long sdid)
			throws ServiceInvocationException;

	/**
	 * to judge whether a person is in my blacklist
	 * 
	 * @param sdid
	 * @param ssid
	 * @return 1 indicate yes 0 otherwise(contained in the data)
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias="getJudgePerson")
	public UpdateResponse judgePerson(@Param("sdid") Long sdid,
			@Param("ssdid") Long ssdid) throws ServiceInvocationException;

	/**
	 * return the total number in the blacklist
	 * 
	 * @param sdid
	 * @return the total number is in the data field
	 */
	@Endpoint(alias="getBlacklistCount")
	public GetResponse<Integer> listBlacklistCount(@Param("sdid") Long sdid)
			throws ServiceInvocationException;
}
